css-deprecated-flexbox: fixes coordinates when flipped -webkit-box always starts horizontal layout from an x position of 0. rtl is handled by starting at 0 and iterating in reverse. https://chromium-review.googlesource.com/c/chromium/src/+/1876073 got close to this by making the width_for_rtl come from the hypothetical size. Unfortunately that doesn't deal with flex. This patch changes how coordinates are calculated when flipped to better give behavior expected of -webkit-box, and it also changes when start/end are flipped. I've add more test cases with a bunch of variations to ensure all cases are handled. This also changes the expectations of paint/invalidation/overflow/float-overflow-right.html. The expectations now match that before the patch at https://chromium-review.googlesource.com/c/chromium/src/+/1876073 BUG=1034461 1037764 TEST=external/wpt/compat/webkit-box-rtl-flex.html external/wpt/compat/webkit-box-horizontal-rtl-variants.html external/wpt/compat/webkit-box-horizontal-reverse-variants.html Change-Id: Ib32dcfef7c147d2e90b754d35f974ebe9c6092b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1989930 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#729910} 
diff --git a/compat/webkit-box-rtl-flex.html b/compat/webkit-box-rtl-flex.html new file mode 100644 index 0000000..d20b3a0 --- /dev/null +++ b/compat/webkit-box-rtl-flex.html 
@@ -0,0 +1,26 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/1034461"> +<link rel="match" href="webkit-box-rtl-flex-ref.html"> +<style> +#webkitbox { + width: 500px; + display: -webkit-box; + direction: rtl; +} + +#redbox { + background: red; + -webkit-box-flex: 1; +} + +#greenbox { + background: green; + -webkit-box-flex: 1; +} + +</style> +<p>There should be a green box followed by a red box, both on the same line. +<div id="webkitbox"> + <div id="redbox">A</div> + <div id="greenbox">B</div> +</div>